package com.example.netty.server.controller;

import com.example.netty.server.MyManager;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MyController {

    @GetMapping(value = "/send")
    public Object send(@RequestParam(required = false) String channelId, @RequestParam String msg) {
        MyManager.send(channelId, msg);
        return "ok";
    }
}
